<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%
	StringBuffer strURL = request.getRequestURL();
	String URL = strURL.toString();
	String contPath = request.getContextPath();
	int nIndex = URL.indexOf(contPath);
	URL = "http://tugo.cn/weixin_aef/";
	%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
	content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<!-- 移动端必须的设置 -->
<link rel="stylesheet" href="<%=URL%>newedition/css/aui.css" />
<link rel="stylesheet"
	href="<%=URL%>newedition/css/user_infoNews.css" />
<link rel="stylesheet"
	href="<%=URL%>newedition/css/aui-pull-refresh.css" />
<script type="text/javascript"
	src="<%=URL%>newedition/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/aui-pull-refresh.js"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/doRefresh.js"></script>
<script type="text/javascript"
	src="<%=URL%>js/cookies.js?version=1.1"></script>
<script type="text/javascript" src="<%=URL%>js/doT.min.js"></script>
<title>收油商-消息通知</title>
<style>
.aui-tab-item.aui-active {
	color: #ffcc00;
	border-bottom: 2px solid #ffcc00;
}

.news-content {
	border-bottom: none;
}

.point {
	background-color: #00cab5;
}
</style>
</head>

<body>
	<div class="body-box">
		<header class="aui-bar aui-bar-nav"> <!-- <a
			class="aui-pull-left aui-btn"> <span
			class="aui-iconfont aui-icon-left"></span>
		</a> -->
		<div class="aui-title">消息通知</div>
		<!--<a class="aui-pull-right aui-btn">
					<span class="aui-iconfont aui-icon-more"></span>
				</a>--> </header>
		<div class="newsList-box aui-refresh-content" id="dotmainhtml">

			<!--<div class="news-time aui-padded-5">2017-07-10</div>-->
			<script type="template" id="dotTmpl">
{{if(it.length!=0){ }}
   {{ for(var i=0;i<it.length;i++){	}}	
<div class="aui-content-padded newsList">
						<div class="news-body aui-padded-10">
						<div class="news-title">
							<i class="point"></i>
							<span>{{=it[i].title}}</span>
						</div>
						<div class="news-content">{{=it[i].content}}</div>
					</div>
</div>
{{ }}}
{{ }}}
					</script>


		</div>
	</div>
</body>
<script>
	$(function() {
		messagefindlist(0)
	})
	function messagefindlist(isread){
		var jsonstr = "filterscount=0&groupscount=0&pagenum=0&pagesize=20&recordstartindex=0&recordendindex=20&userid="+getCookie("salesmanid")+"&isread="+isread+"";
		$.ajax({
				cache : false,
				type : "post",
				datatype : 'json',
				contentType : 'application/json;charset=UTF-8',
				data : jsonstr,
				url : 'http://118.178.18.0:8082/alfa-mobile-ws/rest/message/findlist?mobiletoken='+getCookie("mobiletokensalesman")+'',
				success : function(data) {
						var tmpl = doT.template($("#dotTmpl").html());
						// 将数据扔进templ中。并在DIV中显示出来
						$("#dotmainhtml").html(tmpl(data.rows));
					}
			});
	}
		dorefresh();
	</script>

</html>